<php> $this->display(tpl('head')); </php>
<style>
	.layui-input-block span{
		float: left;
		padding: 10px 0;
	}
	.layui-form-select,.layui-textarea{
		width: 30%;
	}
	.layui-form-select{
		margin-top: 10px;
	}
</style>
<fieldset class="layui-elem-field layui-field-title">
	<legend>认证详情管理</legend>
</fieldset>
<div class="layui-form-item">
	<label class="layui-form-label">用户名</label>
	<div class="layui-input-block">
		<span>
			{{$data['username']}}</span>
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">验证主体</label>
	<div class="layui-input-block">
		<span>
			{{$data['id_type']==1 ? '个人认证' : '企业认证' }}</span>
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">主体名称</label>
	<div class="layui-input-block">
		<span>
			{{$data['real_name'] }}</span>
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">主体代码</label>
	<div class="layui-input-block">
		<span>
			{{$data['id_number'] }}</span>
	</div>
</div>
<if condition="$data['id_type']==1">
<div class="layui-form-item">
	<label class="layui-form-label">身份证正面照片</label>
	<div class="layui-input-block upimg">
		<img src="{{$img['idcard_zheng'] }}">
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">身份证反面照片</label>
	<div class="layui-input-block upimg">
		<img src="{{$img['idcard_fan'] }}">
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">手持身份证照片</label>
	<div class="layui-input-block upimg">
		<img src="{{$img['idcard_shouchi'] }}">
	</div>
</div>
<else>
<div class="layui-form-item">
	<label class="layui-form-label">营业执照扫描件</label>
	<div class="layui-input-block upimg">
		<img src="{{$img['company_business'] }}">
	</div>
</div>
</if>
<form class="layui-form" method="post">
	<table class="layui-table  my-tabel">
		<tbody>
			<tr>
				<td>认证日志</td>
				<td>
					<table class="layui-table">
						<tbody>
							<foreach array="log">
							<tr>
								<td style="width: 150px;">{{date('Y-m-d H:i:s',$row['posttime']) }}</td>
								<td>{{$row['msg'] }}</td>
							</tr>
							</foreach>
							<if condition="!$log">
							<tr>
								<td>暂无日志</td>
							</tr>
							</if>
						</tbody>
					</table>
				</td>
			</tr>
			<tr>
				<td>事件</td>
				<td>
					<textarea class="layui-textarea" id="msg" name="msg"></textarea>
					<select lay-filter="select">
						<option value="证照齐全，给予通过">证照齐全，给予通过</option>
						<option value="证照不全，退回编辑。">证照不全，退回编辑。</option>
						<option value="资料不全，退回编辑。">资料不全，退回编辑。</option>
						<option value="资料不符，退回编辑。">资料不符，退回编辑。</option>
					</select>
				</td>
			</tr>
			<if condition="$data['id_rz_state']=='-1'">
			<tr>
				<td colspan="2" class="my_button">
					<input type="hidden" name="step" id="" value="post" />
					<button class="layui-btn" name="aciton" value="1" lay-submit lay-filter="*">完成审核</button>
					<button class="layui-btn" name="aciton" value="-2" lay-submit lay-filter="*">审核退回</button>
				</td>
			</tr>
			</if>
		</tbody>
	</table>
</form>
<script type="text/javascript">
	layui.use('form', function() {
		var form = layui.form;
		form.on('select(select)', function(data) {
			$('#msg').val(data.value);
		});
		form.on('submit(*)', function(data){
			if(!data.field.msg){
				layer.msg('操作事件，必须录入');
				 return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
			}
		 
		});
	});
</script>
<php> $this->display(tpl('foot'));</php>
